package com.tarena.lbs.stock.web.mapper;

import com.tarena.lbs.pojo.stock.dos.CouponStockDO;
import org.apache.ibatis.annotations.Update;

public interface StockMapper {
    int insert(CouponStockDO csDO);

    @Update("update tarena_lbs_stock.coupon_stock set num=num-1 where coupon_id=#{couponId} and num>0")
    int updateCouponNumById(Integer couponId);
}
